package com.class05.advice;

import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;

/**
 * @ClassDescription:
 * @JdkVersion: 17
 * @Author: yxy
 * @Created: 2023/11/6 14:58
 */
@Component
public class TxAdvice {
    public void begin(){
        System.out.println("开启事务");
    }
    public void commit(Object result){
        System.out.println("提交事务结果为；result = " + result);
    }
    public void rollback(Throwable t){
        System.out.println("事务回滚t = " + t);

    }
}
